package com.zyh.scs.admin.api.vo;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;
import org.javers.core.metamodel.annotation.DiffInclude;
import org.javers.core.metamodel.annotation.PropertyName;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * @author hwh
 * @ClassName: 用户信息VO$
 * @Description: $
 * @Date $
 * @Version 1.0
 */
@Data
@Schema(description = "用户信息VO")
@Accessors(chain = true)
public class UserDetailVO implements Serializable {

    /**
     * 主键ID
     */
    @TableId(value = "user_id", type = IdType.AUTO)
    @Schema(description = "主键id")
    private Long userId;

    /**
     * 用户名
     */
    @Schema(description = "用户名")
    @TableField("username")
    private String username;

    /**
     * 账号
     */
    @Schema(description = "账号")
    @TableField("user_account")
    private String userAccount;

    /**
     * 角色id
     */
    @TableField(value = "role_id")
    @Schema(description = "角色id")
    private Long roleId;


    /**
     * 创建人
     */
    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "创建人")
    private String createBy;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    /**
     * 手机号
     */
    @DiffInclude
    @PropertyName("手机号")
    @Schema(description = "手机号")
    @Length(min = 11, max = 11, message = "手机号必须为11位")
    private String phone;

    /**
     * 头像
     */
    @Schema(description = "头像地址")
    private String avatar;

    /**
     * 部门ID
     */
    @Schema(description = "用户所属部门id")
    @TableField("dept_id")
    private String deptId;

    @Schema(description = "第三方用户所属部门id")
    @TableField("third_dept_id")
    private String thirdDeptId;


    /**
     * 部门名称
     */
    @Schema(description = "部门名称")
    @TableField("dept_name")
    private String deptName;

    /**
     * 工号
     */
    @TableField("user_job_number")
    @Schema(description = "工号")
    private String userJobNumber;

    /**
     * 餐卡卡号
     */
    @TableField("user_meals_number")
    @Schema(description = "餐卡卡号")
    private String userMealsNumber;

    /**
     * 是否绑卡
     */
    @TableField("is_the_card")
    @Schema(description = "是否绑卡 默认0否 1是")
    private Integer isTheCard;

    /**
     * 用户类型1内部员工2委外员工3见习员工4充值无管理费人员5委外单位6食堂职工7其他8外部
     */
    @Schema(description = "用户类型1内部员工2委外员工3见习员工4充值无管理费人员5委外单位6食堂职工7其他8外部7其他8外部")
    @TableField("user_type")
    private Integer userType;

    /**
     * 现金账户金额元
     */
    @Schema(description = "现金账户金额元")
    @TableField("cash_account")
    private BigDecimal cashAccount;

    /**
     * 餐补账户账户金额元
     */
    @Schema(description = "餐补账户账户金额元")
    @TableField("card_account")
    private BigDecimal cardAccount;

    /**
     * 岗位
     */
    @Schema(description = "任职信息")
    @TableField("post")
    private String post;

    /**
     * 岗位id
     */
    @Schema(description = "岗位id")
    @TableField("post_id")
    private Long postId;

    /**
     * 现金账户状态  1正常  2冻结
     */
    @Schema(description = "现金账户状态  1正常  2冻结")
    @TableField("cash_state")
    private String cashState;

    /**
     * 福利卡账户状态  1正常  2冻结
     */
    @Schema(description = "福利卡账户状态  1正常  2冻结")
    @TableField("card_state")
    private String cardState;

    /**
     * 备注
     */
    @Schema(description = "备注")
    @TableField("note")
    private String note;

    /**
     * 泛微的psn_id   内部员工唯一标识
     */
    @Schema(description = "泛微的psn_id   内部员工唯一标识")
    @TableField("psn_id")
    private String psnId;

    /**
     * 所属公司
     */
    @Schema(description = "所属公司")
    @TableField("company_name")
    private String companyName;

    /**
     * 所属公司id
     */
    @Schema(description = "所属公司id")
    @TableField("company_id")
    private Long companyId;

    @Schema(description = "状态 0为开启  9为关闭")
    private String status;

    /**
     * 锁定标记 是否禁用 启用，0未锁定，9已锁定
     */
    @Schema(description = "锁定标记 是否禁用 启用，0未锁定，9已锁定")
    private String lockFlag;

    /**
     * 权限id
     */
    @Schema(description = "权限id")
    private Long id;

    /**
     * guid
     */
    @Schema(description = "guid")
    private String guid;

}
